<?php

/**
 * Description of RerankingForm
 *
 * @author Pavel Homolka
 */
use Nette\Application\UI\Form,
    Nette\ComponentModel\IContainer;

class RerankingForm extends Form {

    public function __construct(Nette\ComponentModel\IContainer $parent = NULL, $name = NULL) {
        parent::__construct($parent, $name);

        $this->addGroup('Autor');
        $this->addText('autor', 'Autor:');
        $this->addText('autorRadius', 'Citlivost:')
                ->setDefaultValue(10)
                ->addRule(Form::INTEGER, 'Citlovost musi být číslo.');

        $this->addGroup('Název');
        $this->addText('title', 'Název:');
        $this->addText('titleRadius', 'Citlivost:')
                ->setDefaultValue(10)
                ->addRule(Form::INTEGER, 'Citlovost musi být číslo.');

        $this->addGroup('Tag');
        $this->addText('tag', 'Tag:');
        $this->addText('tagRadius', 'Citlivost:')
                ->setDefaultValue(10)
                ->addRule(Form::INTEGER, 'Citlovost musi být číslo.');

        $this->addGroup('Vzdušná vzdálenost');
        $this->addText('gps', 'GPS:')->setDefaultValue('50.0897781; 14.3984339');
        $this->addText('gpsRadius', 'Radius [km]:')
                ->setDefaultValue(10)
                ->addRule(Form::FLOAT, 'Citlovost musi být číslo.');

        $this->addGroup('Datum');
        $this->addText('dateUpload', 'Datum uložení:');
        $this->addText('dateUploadRadius', 'Citlivost [dny]:')
                ->setDefaultValue(10)
                ->addRule(Form::FLOAT, 'Citlovost musi být číslo.');
        $this->addText('dateTaken', 'Datum vyfocení:');
        $this->addText('dateTakenRadius', 'Citlivost [dny]:')
                ->setDefaultValue(10)
                ->addRule(Form::FLOAT, 'Citlovost musi být číslo.');

        $this->addGroup();
        $this->addSubmit('search', 'Setřídit');
    }

}

?>
